package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.Room;
import com.antdesignbackend.backend.entity.entityVo.RoomVo;
import com.antdesignbackend.backend.mapper.RoomMapper;
import com.antdesignbackend.backend.service.IRoomService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomServiceImpl extends ServiceImpl<RoomMapper, Room> implements IRoomService {
    @Autowired
    private RoomMapper roomMapper;


    @Override
    public List<RoomVo> search(QueryWrapper<RoomVo> queryWrapper, Page<RoomVo> page) {
        return roomMapper.search(queryWrapper, page);
    }
    @Override
    public Integer count(QueryWrapper<RoomVo> queryWrapper) {
        return roomMapper.count(queryWrapper);
    }
    @Override
    public List<RoomVo> searchRoom(QueryWrapper<RoomVo> queryWrapper, Page<RoomVo> page) {
        return roomMapper.searchRoom(queryWrapper, page);
    }
    @Override
    public Integer countRoom(QueryWrapper<RoomVo> queryWrapper) {
        return roomMapper.countRoom(queryWrapper);
    }

}
